<%@page import="java.nio.file.attribute.UserDefinedFileAttributeView"%>
<html>
	<head>
		<meta name="layout" content="main"/>
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.css')}" type="text/css"/> 
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'image.css')}" type="text/css"/>
		<title>uTalk - Home</title>
	</head>
	<body>
		<!-- Onglet des différentes fonctionnalités -->
		<ul class="nav nav-pills">
			<li><a href="${createLink(controller:'user', action:'home')}">Home</a></li>
	  		<li><a href="${createLink(controller:'user', action:'profile')}">Profile</a></li>
	  		<li><a href="${createLink(controller:'user', action:'message')}">Messages</a></li>
		</ul>
		
					
		<!--  Talk des personnes que l'on suit -->
		<table class="table table-striped">
		 <tr>
			<td>
					<g:each var="talk" in="${hashDetails?.listTalks}">
					
					<g:if test="${talk?.userSender?.path == null}">
						<div class="media">
				    		<img class="media-object mini" src="${resource(dir: 'images', file: 'inconu.gif')}">
						</div>
					</g:if>
					<g:else>
						<div class="media">
							<g:if test="${talk?.userSender?.url == true}">
	    						<img class="media-objec thumb" src="${talk?.userSender?.path}">
	    					</g:if>
	    					<g:else>
	    				 		<img class="media-objec thumb" src="${resource(dir: 'images', file: "${talk?.userSender?.path}")}">
	    					</g:else>
						</div>
					</g:else>
					
						<span class="label label-info"><g:link controller="user" action="profileDetails" params="${[userDetails : talk?.userSender?.pseudo]}">${talk?.userSender?.pseudo}</g:link></span>
						<g:formatDate format="yyyy-MM-dd" date="${talk?.dateWrite}"/>
						<br/>
						<div>${talk.message}</div>
						<br/>
						<br/>
					</g:each>
				</td>
			</tr>
		</table>
	</body>
</html>